﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" CodeFile="Threads.aspx.cs" Inherits="Threads" %>


<asp:Content ID="Content1" runat="server" contentplaceholderid="MainContent">

    <script type="text/javascript" src="Scripts/Threads.js"></script>
  
     <table id="ThreadsTable" style="width: 80%;" border="1" align="center">
        <tr>
            <th>
                &nbsp;</th>
            <th class="style2">
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Header</th>
            <th class="style8">
                Replies</th>
            <th class="style9">
                Views&nbsp;
            </th>
            <th class="style5">
                Create by</th>
            <th class="style6">
                Publish At</th>
            <th class="style7">
                Last Change</th>
        </tr>
    </table>
    <div id="pageNavPosition">
    </div>
    <asp:Label ID="ErrorLabel" runat="server" Font-Bold="True" Font-Size="13pt" 
        ForeColor="Red"></asp:Label>
    <br />
    <div style="text-align:left" visible="false">
        <a id=moderator type="text/html" title="<%=Session["isModerator"]%>" style="display:none"></a>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <input id="AddButton" type="button" onclick="addClicked()" value="Add Thread" />
        <input id="EditButton" type="button" onclick="editClicked('<%=Session["isModerator"]%>', '<%=Session["username"] %>')" value="Edit Thread"/>
        <input id="DeleteButton" type="button" onclick="deleteThread('<%=Session["isModerator"]%>', '<%=Session["username"] %>');" value="Delete Thread" style="display:none"/>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <br />
        <br />
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:Label ID="AddThreadHeaderLabel" runat="server" Text="Header" style="display:none"></asp:Label>
        &nbsp;&nbsp;
        <asp:TextBox ID="AddThreadHeaderTextBox" runat="server" Width="300px" style="display:none"></asp:TextBox>
        <br />
        <br />
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:Label ID="AddThreadBodyLabel"  runat="server" Text="Body" style="display:none"></asp:Label>
        <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;
        <asp:TextBox ID="AddThreadBodyTextBox" runat="server" Height="121px" TextMode="MultiLine"
            Width="300px" BorderStyle="Inset" style="display:none"></asp:TextBox>
        <br />
        <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <input id="AddThreadButton" type="button" onclick="addEditThreadClick('<%=Session["username"]%>', true)" value="Add" style="visibility:hidden" />
        <input id="EditThreadButton" type="button" onclick="addEditThreadClick('<%=Session["username"]%>', false)" value="Edit" style="visibility:hidden" />
        <input id="CancelButton" type="button" onclick="cancelClicked()" value="Cancel" style="visibility:hidden" />
        <br />
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:Label ID="AddThreadErrorLabel" runat="server" ForeColor="Red" Text="Label" style="display:none"></asp:Label>
        <br />
        <br />
        <br />
    </div>
    <div>
    <asp:Label ID="editOldHeader" runat="server" Visible="False"></asp:Label>
    <script type="text/javascript">
        function getUsername() {
            var user = '<%=Session["username"]%>';
            return user;
        }
    </script>
    </div>
</asp:Content>

<asp:Content ID="Content2" runat="server" contentplaceholderid="HeadContent">
    <style type="text/css">
        .style2
        {
            width: 648px;
        }
        .style5
        {
            width: 62px;
        }
        .style6
        {
            width: 94px;
        }
        .style7
        {
            width: 100px;
        }
        .style8
        {
            width: 58px;
        }
        .style9
        {
            width: 54px;
        }

    </style>
</asp:Content>